

<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">


    <table class="table table-hover table-bordered">

        <table class="layui-hide" id="test" lay-filter="test"></table>

        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">

            </div>
        </script>
        <script type="text/html" id="barDemo">
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
        </script>

        <!--    自定义    -->
        <script type="text/html" id="titleTpl">
            {{#  if(d.stype == 1){ }}
                积分
            {{#  } else { }}
                参赛券
            {{#  } }}
        </script>


        <script type="text/html" id="titleTpl2">
            <a class="layui-btn layui-btn-xs" lay-event="inuser">{{d.inuser}}</a>
        </script>

        <script>

            layui.use('table', function(){
                var table = layui.table;
                var id="{$id}";
                var tableIns =table.render({
                    elem: '#test' ,
                    url:'inuser',
                    method: 'post',
                    title: '用户数据表',
                    totalRow: true ,
                    where:{'id':id},
                    limit:9999,
                    cols: [[

                        {field:'game_name', title:'比赛名称',edit: 'text', unresize: true, sort: true, totalRowText: '合计'}
                        // ,{field:'speak', title:'主讲'}
                        ,{field:'user_nickname', title:'用户'}
                        ,{field:'', title:'参数方式', templet: '#titleTpl'}
                        ,{field:'score', title:'积分', totalRow: true}
                        ,{field:'number', title:'参数次数', totalRow: true}
                        ,{field:'ticket_log_name', title:'券信息'}

                    ]]
                    ,page: false,
                    done: function(res, curr, count){
                        console.log(res)
                    }
                });


            });
        </script>


    </table>

</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>